﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Collections.Generic;

namespace UpYourLife.ViewModels
{
    public class MainViewModel: INotifyPropertyChanged
    {
        public MainViewModel()
        {
            this.Items = new ObservableCollection<MainMenuItemViewModel>()
            {
                new MainMenuItemViewModel() { IconPath = "images/check_in.png", LineOne = "Địa điểm", LineTwo = "Tìm kiếm & hướng dẫn", TargetView = "Views/MapPage.xaml" },
                new MainMenuItemViewModel() { IconPath = "images/check-ins.png", LineOne = "Thời gian biểu", LineTwo = "Lịch làm việc của bạn", TargetView="Vies/SchedulePage.xaml" },                
                new MainMenuItemViewModel() { IconPath = "images/setup.png", LineOne = "Cấu hình", LineTwo = "Tinh chĩnh ứng dụng", TargetView=string.Empty  },
                new MainMenuItemViewModel() { IconPath = "images/logout.png", LineOne = "Thoát", LineTwo = "", TargetView=string.Empty  },
            };
        }

        public ObservableCollection<MainMenuItemViewModel> Items
        {
            get;
            private set;
        }

                

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String propertyName)
        {
            // Ensure that the string being passed in is actually the name of a property.
            //Debug.Assert(this.GetType().GetProperty(propertyName) != null);

            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
